home *** CD-ROM | disk | FTP | other *** search
/ The Original Shareware 1.1 / The Original Shareware (WeMake CDs)(Volume 1.1)(CDs, Inc)(1993).iso / 14 / lotusfmt.zip / WSFF1.TXT next >
Text File  |  1986-08-31  |  14KB  |  339 lines

  1.                             WORKSHEET FILE FORMAT 
  2.                                   FROM LOTUS 
  3.  
  4.                        INTRODUCTION AND QUICK REFERENCE
  5.  
  6.                Copyright(c) 1984, Lotus Development Corporation 
  7.                                161 First Street 
  8.                         Cambridge, Massachusetts 02142 
  9.                                 (617) 492-7171 
  10.                       Electronic Edition, December, 1984 
  11.                              All Rights Reserved 
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  PREFACE 
  68.  
  69.  Lotus Development Corporation's 1-2-3(TM) and Symphony(TM) perform user
  70.  selected operations upon a data matrix that is termed a "worksheet". 
  71.  
  72.  Worksheet files are such matrices stored on disk. 
  73.  
  74.  A worksheet file is an unbroken sequence of binary coded records defining a
  75.  single worksheet. 
  76.  
  77.  Both 1-2-3 and Symphony accept externally created data files if the files
  78.  are in the worksheet file format.  Other programs can decode and process
  79.  worksheet files created by 1-2-3 or Symphony. 
  80.  
  81.  The following document provides information required to create or access a
  82.  worksheet file by describing the records used to create a worksheet file.
  83.  It is assumed that the reader is familiar with Lotus products and has ready
  84.  access to 1-2-3 or Symphony documentation. 
  85.  
  86.  Note that the worksheet files for 1-2-3 and Symphony are similar, but not
  87.  necessarily interchangeable.  1-2-3 and Symphony share some record types,
  88.  but also have record types unique to that product.  Symphony can read 1-2-3
  89.  records, but 1-2-3 cannot read Symphony records. 
  90.  
  91.  The information contained in this document has been released into the
  92.  public domain and is not considered to be confidential or proprietary
  93.  although still the copyright and property of Lotus Development Corporation.
  94.  All efforts have been made to ensure that this information is clear and
  95.  useful since Lotus will not be providing customer assistance with this
  96.  booklet.  Lotus will, however, incorporate any necessary corrections if
  97.  they are reported in writing to: 
  98.  
  99.                         Lotus Development Corporation 
  100.                         Worksheet File Format 
  101.                         161 First Street 
  102.                         Cambridge, MA 02142 
  103.  
  104.  
  105.  WORKSHEET FILE FORMAT 
  106.  
  107.  Worksheet files are organized as an unbroken sequence of variable length
  108.  binary records.  Each record consists of a 4-byte header followed by the
  109.  record body. The header defines the record's type and length, as the
  110.  example below shows.
  111.   
  112.  The header's composition is as follows: 
  113.  
  114.  
  115.  
  116.  Byte Number               Byte Description 
  117.  0,1                       Record type code 
  118.  2,3                       Record body length (bytes) 
  119.  
  120.  
  121.  Example: Record Header 
  122.  
  123.                                Record Header 
  124.  
  125.                            Record         Record 
  126.                             Type          Length 
  127.  
  128.           Byte Number      0    1         2    3 
  129.              Hex Code     1C   00        20   00 
  130.    Decimal Equivalent       28             32 
  131.  
  132.  
  133.  The record body can be of many different types; most have predetermined
  134.  length, but some vary in length. 
  135.  
  136.  The record type code is 28. 
  137.  
  138.  In a hex dump of the file, the record type appears as 1C 00h, noting that
  139.  the 8086/88 stores the most significant byte of word in the higher memory
  140.  address. 
  141.  
  142.  The record length is 32 bytes. 
  143.  In a hex dump of the file, the record length appears as 20 00h. 
  144.  
  145.  
  146.  Record types with Column/Row Coordinates 
  147.  
  148.  Some record types contain column/row coordinates to identify a cell, or one
  149.  of the two points that define a range.  Numbering starts at zero in the
  150.  upper left corner of the worksheet. 
  151.  For example: 
  152.  
  153.                              Cell A1 = column 0, row 0 
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  SUMMARY OF RECORD TYPES 
  160.  
  161.  This section describes the different record types found in 1-2-3 and
  162.  Symphony. 
  163.  
  164.  There are to Quick Reference tables ordered by Opcode and by Product,
  165.  followed by a detailed reference section ordered by Opcode.  In the
  166.  reference section, there are examples for the more commonly used records. 
  167.  
  168.  It is assumed that the reader is familiar with 1-2-3 or Symphony and has
  169.  access to Lotus' documentation. 
  170.  
  171.  Quick Reference by Opcode 
  172.  
  173.  Type       Code (hex)        Length (bytes)         Description 
  174.  
  175.  BOF            0                2                   Beginning of file 
  176.  EOF            1                0                   End of file 
  177.  CALCMODE       2                1                   Calculation mode 
  178.  CALCORDER      3                1                   Calculation order 
  179.  SPLIT          4                1                   Split window type 
  180.  SYNC           5                1                   Split window sync 
  181.  RANGE          6                8                   Active worksheet range 
  182.  WINDOW1        7                31                  Window 1 record 
  183.  COLW1          8                3                   Column width, 
  184.                                                        window 1 
  185.  WINTWO         9                31                  Window 2 record 
  186.  COLW2          A                3                   Column width, 
  187.                                                        window 2 
  188.  NAME           B                24                  Named range 
  189.  BLANK          C                5                   Blank cell 
  190.  INTEGER        D                7                   Integer number cell 
  191.  NUMBER         E                13                  Floating point number 
  192.  LABEL          F                variable            Label cell 
  193.  FORMULA        10               variable            Formula cell 
  194.  TABLE          18               25                  Data table range 
  195.  ORANGE         19               25                  Query range 
  196.  PRANGE         1A               8                   Print range 
  197.  SRANGE         1B               8                   Sort range 
  198.  FRANGE         1C               8                   Fill range 
  199.  KRANGE1        1D               9                   Primary sort key range 
  200.  HRANGE         20               16                  Distribution range 
  201.  KRANGE2        23               9                   Secondary sort key 
  202.                                                        range 
  203.  PROTEC         24               1                   Global protection 
  204.  FOOTER         25               242                 Print footer 
  205.  HEADER         26               242                 Print header 
  206.  SETUP          27               40                  Print setup 
  207.  MARGINS        28               10                  Print margins code 
  208.  
  209.  
  210.  
  211.  Quick Reference by Opcode (continued) 
  212.  
  213.  Type         code (hex)       Length (bytes)        Description 
  214.  
  215.  LABELFMT        29                  1               Label alignment 
  216.  TITLES          2A                  16              Print borders 
  217.  GRAPH           2D                  437             Current graph settings 
  218.  NGRAPH          2E                  453             Named graph settings 
  219.  CALCCOUNT       2F                  1               Iteration count 
  220.  UNFORMATTED     30                  1               Formatted/unformatted 
  221.                                                        print 
  222.  CURSORW12       31                  1               Cursor location 
  223.  WINDOW          32                  144             Symphony window 
  224.                                                        settings 
  225.  STRING          33                  variable        Value of string  
  226.                                                        formula 
  227.  PASSWORD        37                  4               File lockout (CHKSUM) 
  228.  LOCKED          38                  1               Lock flag 
  229.  QUERY           3C                  127             Symphony query 
  230.                                                        settings 
  231.  QUERYNAME       3D                  16              Query name 
  232.  PRINT           3E                  679             Symphony print record 
  233.  PRINTNAME       3F                  16              Print record name 
  234.  GRAPH2          40                  499             Symphony graph 
  235.                                                        record 
  236.  GRAPHNAME       41                  16              Graph record name 
  237.  ZOOM            42                  9               Orig coordinates 
  238.                                                        expanded window 
  239.  SYMSPLIT        43                  2               Nos. of split windows 
  240.  NSROWS          44                  2               Nos. of screen rows 
  241.  NSCOLS          45                  2               Nos. of screen columns 
  242.  RULER           46                  25              Named ruler range 
  243.  NNAME           47                  25              Named sheet range 
  244.  ACOMM           48                  65              Autoload.comm code 
  245.  AMACRO          49                  8               Autoexecute macro 
  246.                                                        address 
  247.  PARSE           4A                  16              Query parse 
  248.                                                        information 
  249.  
  250.  
  251.  
  252.  
  253.  Quick Reference by Product: 1-2-3 only 
  254.  
  255.  Type          Code (hex)         Length (bytes)     Description 
  256.  
  257.  SPLIT            4                    1             Split window type 
  258.  SYNC             5                    1             Split window sync 
  259.  WINDOW 1         7                    31            Window 1 record 
  260.  WINTWO           9                    31            Window 2 record 
  261.  COLW2            A                    3             Column width,  
  262.                                                        window 2 
  263.  NAME             B                    24            Named range 
  264.  QRANGE           19                   25            Query range 
  265.  PRANGE           1A                   8             Print range 
  266.  SRANGE           1B                   8             Sort range 
  267.  KRANGE1          1D                   9             Primary sort key range 
  268.  KRANGE2          23                   9             Secondary sort key 
  269.                                                        range 
  270.  FOOTER           25                   242           Print footer 
  271.  HEADER           26                   242           Print header 
  272.  SETUP            27                   40            Print setup 
  273.  MARGINS          28                   10            Print margins code 
  274.  TITLES           2A                   16            Print borders 
  275.  GRAPH            2D                   437           Current graph settings 
  276.  NGRAPH           2E                   453           Named graph settings 
  277.  
  278.  
  279.  
  280.  
  281.  Quick Reference by Product: 1-2-3 and Symphony 
  282.  
  283.  Type          Code (hex)         Length (bytes)     Description 
  284.  
  285.  BOF               0                   2             Beginning of file 
  286.  EOF               1                   0             End of file 
  287.  CALCMODE          2                   1             Calculation mode 
  288.  CALCORDER         3                   1             Calculation order 
  289.  RANGE             6                   8             Active worksheet range 
  290.  COLW1             8                   3             Column width 
  291.  BLANK             C                   5             Blank cell 
  292.  INTEGER           D                   7             Integer number cell 
  293.  NUMBER            E                   13            Floating point number 
  294.  LABEL             F                   variable      Label cell 
  295.  FORMULA           10                  variable      Formula cell 
  296.  TABLE             18                  25            Data table range 
  297.  FRANGE            1C                  8             Fill range 
  298.  HRANGE            20                  16            Distribution range 
  299.  PROTEC            24                  1             Global protection 
  300.  LABELFMT          29                  1             Label alignment 
  301.  CALCCOUNT         2F                  1             Iteration count 
  302.  UNFORMATTED       30                  1             Formatted/unformatted 
  303.                                                        print 
  304.  CURSORW12         31                  1             Cursor location 
  305.  
  306.  
  307.  
  308.  
  309.  Quick Reference by Product: Symphony only 
  310.  
  311.  Type          Code (hex)        Length (bytes)      Description 
  312.  
  313.  WINDOW           32                 144             Symphony window 
  314.                                                        settings 
  315.  STRING           33                 variable        Value of string 
  316.                                                        formula 
  317.  PASSWORD         37                 4               File lockout (CHKSUM) 
  318.  LOCKED           38                 1               Lock flag 
  319.  QUERY            3C                 127             Symphony query 
  320.                                                        settings 
  321.  QUERYNAME        3D                 16              Query name 
  322.  PRINT            3E                 679             Symphony print record 
  323.  PRINTNAME        3F                 16              Print record name 
  324.  GRAPH2           40                 499             Symphony graph 
  325.                                                        record 
  326.  GRAPHNAME        41                 16              Graph rocord name 
  327.  ZOOM             42                 9               Orig coordinates 
  328.                                                        expanded window 
  329.  SYMSPLIT         43                 2               Nos. of split windows 
  330.  NSROWS           44                 2               Nos. of screen rows 
  331.  NSCOLS           45                 2               Nos. of screen columns 
  332.  RULER            46                 25              Named ruler range 
  333.  NNAME            47                 25              Named sheet range 
  334.  ACOMM            48                 65              Autoload. comm code 
  335.  AMACRO           49                 8               Autoexecute macro 
  336.                                                        address  
  337.  PARSE            4A                 16              Query parse 
  338.                                                        information 
  339.